﻿// Decompiled with JetBrains decompiler
// Type: 我的小工具.frmUserConfig
// Assembly: 开发辅助工具, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null
// MVID: F78E5980-5E94-4E46-ABDF-DC8C6CBF52AA
// Assembly location: K:\Tools\工具\开发辅助工具庆六一版\开发辅助工具2015-06-01\开发辅助工具.exe

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using 我的小工具.Properties;

namespace 我的小工具
{
  public class frmUserConfig : Form
  {
    private IContainer components = (IContainer) null;
    private Button button1;
    private TextBox textBox1;
    private Label label1;
    private TextBox textBox2;
    private Label label2;

    public frmUserConfig()
    {
      this.InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
      if (string.IsNullOrEmpty(this.textBox1.Text) || string.IsNullOrEmpty(this.textBox2.Text))
      {
        int num1 = (int) MessageBox.Show("请输入用户名密码！");
      }
      else
      {
        Settings.Default.UserCode = this.textBox1.Text;
        Settings.Default.PassWord = this.textBox2.Text;
        try
        {
          Settings.Default.Save();
        }
        catch (Exception ex)
        {
          int num2 = (int) MessageBox.Show(ex.Message);
          return;
        }
        this.DialogResult = DialogResult.OK;
      }
    }

    private void frmUserConfig_Load(object sender, EventArgs e)
    {
      this.textBox1.Text = Settings.Default.UserCode;
      this.textBox2.Text = Settings.Default.PassWord;
    }

    protected override void Dispose(bool disposing)
    {
      if (disposing && this.components != null)
        this.components.Dispose();
      base.Dispose(disposing);
    }

    private void InitializeComponent()
    {
      this.button1 = new Button();
      this.textBox1 = new TextBox();
      this.label1 = new Label();
      this.textBox2 = new TextBox();
      this.label2 = new Label();
      this.SuspendLayout();
      this.button1.Location = new Point(159, 72);
      this.button1.Name = "button1";
      this.button1.Size = new Size(79, 23);
      this.button1.TabIndex = 3;
      this.button1.Text = "确定";
      this.button1.UseVisualStyleBackColor = true;
      this.button1.Click += new EventHandler(this.button1_Click);
      this.textBox1.Location = new Point(70, 13);
      this.textBox1.Name = "textBox1";
      this.textBox1.Size = new Size(167, 21);
      this.textBox1.TabIndex = 1;
      this.label1.AutoSize = true;
      this.label1.Location = new Point(11, 16);
      this.label1.Name = "label1";
      this.label1.Size = new Size(53, 12);
      this.label1.TabIndex = 2;
      this.label1.Text = "用户名：";
      this.textBox2.Location = new Point(70, 40);
      this.textBox2.Name = "textBox2";
      this.textBox2.Size = new Size(167, 21);
      this.textBox2.TabIndex = 2;
      this.label2.AutoSize = true;
      this.label2.Location = new Point(11, 43);
      this.label2.Name = "label2";
      this.label2.Size = new Size(53, 12);
      this.label2.TabIndex = 2;
      this.label2.Text = "密  码：";
      this.AcceptButton = (IButtonControl) this.button1;
      this.AutoScaleDimensions = new SizeF(6f, 12f);
      this.AutoScaleMode = AutoScaleMode.Font;
      this.ClientSize = new Size(250, 106);
      this.Controls.Add((Control) this.label2);
      this.Controls.Add((Control) this.label1);
      this.Controls.Add((Control) this.textBox2);
      this.Controls.Add((Control) this.textBox1);
      this.Controls.Add((Control) this.button1);
      this.MaximizeBox = false;
      this.MinimizeBox = false;
      this.Name = "frmUserConfig";
      this.ShowIcon = false;
      this.StartPosition = FormStartPosition.CenterParent;
      this.Text = "用户设置";
      this.Load += new EventHandler(this.frmUserConfig_Load);
      this.ResumeLayout(false);
      this.PerformLayout();
    }
  }
}
